package b.p.b;

import androidx.recyclerview.widget.RecyclerView.j;
import androidx.recyclerview.widget.RecyclerView.j.c;
import androidx.recyclerview.widget.RecyclerView.z;
import b.p.b.m.a;

/* compiled from: SimpleItemAnimator */
public abstract class d0 extends j {
    public boolean g = true;

    public boolean a(z zVar, z zVar2, c cVar, c cVar2) {
        int i;
        int i2;
        int i3 = cVar.a;
        int i4 = cVar.b;
        if (zVar2.u()) {
            int i5 = cVar.a;
            i = cVar.b;
            i2 = i5;
        } else {
            i2 = cVar2.a;
            i = cVar2.b;
        }
        m mVar = (m) this;
        if (zVar == zVar2) {
            return mVar.i(zVar, i3, i4, i2, i);
        }
        float translationX = zVar.a.getTranslationX();
        float translationY = zVar.a.getTranslationY();
        float alpha = zVar.a.getAlpha();
        mVar.n(zVar);
        int i6 = (int) (((float) (i2 - i3)) - translationX);
        int i7 = (int) (((float) (i - i4)) - translationY);
        zVar.a.setTranslationX(translationX);
        zVar.a.setTranslationY(translationY);
        zVar.a.setAlpha(alpha);
        mVar.n(zVar2);
        zVar2.a.setTranslationX((float) (-i6));
        zVar2.a.setTranslationY((float) (-i7));
        zVar2.a.setAlpha(0.0f);
        mVar.k.add(new a(zVar, zVar2, i3, i4, i2, i));
        return true;
    }

    public abstract boolean i(z zVar, int i, int i2, int i3, int i4);
}
